---
title: useOS
description: "`useOS` is a custom hook that returns the user's OS."
storybook: hooks-useos--basic
source: hooks/use-os
---

```tsx preview functional client
const os = useOS()

return <Text>Your os is "{os}"</Text>
```

## Usage

:::code-group

```tsx [package]
import { useOS } from "@yamada-ui/react"
```

```tsx [alias]
import { useOS } from "@/components/ui"
```

```tsx [monorepo]
import { useOS } from "@workspaces/ui"
```

:::

```tsx
const os = useOS()
```
